<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="apple-mobile-web-app-capable" content="yes"/>
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	   	<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="/Public/Goods/css/shopping.css" />
		<link rel="stylesheet" href="/Public/Goods/css/iconfont/iconfont.css" />
		<link rel="stylesheet" href="/Public/Goods/css/swiper-3.4.2.min.css" />
		<script src="/Public/Goods/js/swiper-3.4.2.min.js"></script>
	</head>
	<body>
		<div id="content">
			<section class="advertising">
				<img src="/Public/Goods/img/食安购.png" alt="" />
				<h3>下载注册食安购</h3>
				<p>购买更多绿色安全食品</p>
				<button onclick="download()">下载APP</button>
			</section>
			<div id="roasting" class="swiper-container">
				<div class="swiper-wrapper">
				<?php if(is_array($imagesList)): foreach($imagesList as $key=>$image): ?><div class="swiper-slide">
						<img src="<?php echo ($image["thumb_url"]); ?>" alt="" width="100%" height="100%"/>
					</div><?php endforeach; endif; ?>
				</div>
				<div class="swiper-pagination"></div>
			</div>
			<section class="shopping-information">
				<h3><?php echo ($goodsList["goods_name"]); ?></h3>
				<p class="prompting">农场直供 有机认证 软糯细腻 鲜嫩可口</p>
				<p class="sales-price">
					<span class="sales-price-left">￥<?php echo ($goodsList["shop_price"]); ?></span>
					<span class="sales-price-right">已售:<?php echo ($goodsList["goods_number"]); ?></span>
				</p>
				<ul>
					<li><i class="iconfont icon-dui"></i>农场直供</li>
					<li><i class="iconfont icon-dui"></i>及时送达</li>
					<li><i class="iconfont icon-dui"></i>有机认证</li>
					<li><i class="iconfont icon-dui"></i>售后无忧</li>
				</ul>
			</section>
			<div class="apprise">
				<p>看看大家怎么说</p>
				<!--<i class="iconfont icon-xia"></i>-->
				<?php if(is_array($goodsList["comment"])): foreach($goodsList["comment"] as $key=>$comment): ?><section>
						<dl>
							<dt><img src="<?php echo ($comment["user_pic"]); ?>"/></dt>
							<dd>
								<p class="telphone"><?php echo ($comment["nick_name"]); ?></p>
								<p class="time"><?php echo date("Y-m-d",$comment['add_time']); ?></p>
							</dd>
						</dl>
						<div>
							<?php echo ($comment["content"]); ?>
						</div>
						<ul>
							<?php for($i=0;$i<count($comment['img']);$i++){ ?>
							<li><img src="<?php echo $comment['img'][$i]; ?>" alt=""></li>
							<?php } ?>
						</ul>
					</section><?php endforeach; endif; ?>
				<p class='download'><button>下载食安购APP 查看更多评价</button></p>
			</div>
			<section class="shopping-image"></section>
			<div id="goodsDetailes" style="position:relative;top:40px;width:100%;left:0;">
				<?php echo ($goods_desc); ?>  
			</div>
		</div>

	</body>
	<script>
		var mySwiper = new Swiper('#roasting',{
			pagination : '.swiper-pagination',
			autoplay: 3000,
			autoplayDisableOnInteraction: false,
			loop: true
		})
	</script>
	<script>
		function download(){
			var u = navigator.userAgent, app = navigator.appVersion;
			var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
			var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
				if(isAndroid){
					location.href="http://openbox.mobilem.360.cn/index/d/sid/3897438";
				}else{
					location.href="https://itunes.apple.com/us/app/食安购/id1278268514?l=zh&ls=1&mt=8";
				}
		}
	</script>
</html>